<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function* helloWorldGenerator() {
        yield "hello";
        yield "world";
        return "ending";
      }

      var hw = helloWorldGenerator();
      console.dir(helloWorldGenerator);
      console.log(helloWorldGenerator.constructor); // ƒ GeneratorFunction() { [native code] }
      console.log(helloWorldGenerator.constructor.prototype);


      var o = new Object('something');
      console.log(o)
    </script>
  </body>
</html>
